<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"
%><%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"
%><%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"
%><%@ taglib prefix="tags" tagdir="/WEB-INF/tags"
%><%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
%>
<c:if test="${includeBody}">
<head>
    <title><fmt:message key="clickStream" /></title>
</head>
<body>
</c:if>
    <div id="clickStreamSearchResultFragment">
        <h1><fmt:message key="clickStream" /></h1>
        <script type="text/javascript">
            dojo.addOnLoad(function() {
                dojo.query(".clickStreamAjaxSearch").forEach(function(element) {
                    Spring.addDecoration(new Spring.AjaxEventDecoration({
                        elementId: element.id,
                        event: "onclick",
                        params: { decorator: "none" }
                    }));
                })

                dojo.query(".clickStreamAjaxDelete").forEach(function(element) {
                    Spring.addDecoration(new Spring.AjaxEventDecoration({
                        elementId: element.id,
                        event: "onclick",
                        popup: "true",
                        params: { decorator: "none" }
                    }));
                })
            });
        </script>
        <c:url var="searchUrl" value="/domain/clickstream/searchAjax"/>
        <table class="listEntities">
            <thead>
                <tr>
                    <th scope="col">
                        <a id="sortLinkcookieId" class="clickStreamAjaxSearch" href="${searchUrl}?${clickStreamSearchForm.cookieIdQueryStringForSortableHeader}">
                            <fmt:message key="clickStream_cookieId"/>&nbsp;${clickStreamSearchForm.cookieIdSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkuserId" class="clickStreamAjaxSearch" href="${searchUrl}?${clickStreamSearchForm.userIdQueryStringForSortableHeader}">
                            <fmt:message key="clickStream_userInode"/>&nbsp;${clickStreamSearchForm.userIdSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkstartDate" class="clickStreamAjaxSearch" href="${searchUrl}?${clickStreamSearchForm.startDateQueryStringForSortableHeader}">
                            <fmt:message key="clickStream_startDate"/>&nbsp;${clickStreamSearchForm.startDateSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkendDate" class="clickStreamAjaxSearch" href="${searchUrl}?${clickStreamSearchForm.endDateQueryStringForSortableHeader}">
                            <fmt:message key="clickStream_endDate"/>&nbsp;${clickStreamSearchForm.endDateSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkreferer" class="clickStreamAjaxSearch" href="${searchUrl}?${clickStreamSearchForm.refererQueryStringForSortableHeader}">
                            <fmt:message key="clickStream_referer"/>&nbsp;${clickStreamSearchForm.refererSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkremoteAddress" class="clickStreamAjaxSearch" href="${searchUrl}?${clickStreamSearchForm.remoteAddressQueryStringForSortableHeader}">
                            <fmt:message key="clickStream_remoteAddress"/>&nbsp;${clickStreamSearchForm.remoteAddressSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">
                        <a id="sortLinkbot" class="clickStreamAjaxSearch" href="${searchUrl}?${clickStreamSearchForm.botQueryStringForSortableHeader}">
                            <fmt:message key="clickStream_bot"/>&nbsp;${clickStreamSearchForm.botSortStatusEntity}
                        </a>
                    </th>
                    <th scope="col">&nbsp;</th>
                </tr>
            </thead>
            <tbody>
            <c:forEach items="${clickStreams}" var="clickStream" varStatus="status">
                <tr>
                    <td>
                        <c:out value="${clickStream.cookieId}"/>
                    </td>
                    <td>
                        <c:out value="${clickStream.userInode}"/>
                    </td>
                    <td>
                        <c:out value="${clickStream.startDate}"/>
                    </td>
                    <td>
                        <c:out value="${clickStream.endDate}"/>
                    </td>
                    <td>
                        <c:out value="${clickStream.referer}"/>
                    </td>
                    <td>
                        <c:out value="${clickStream.remoteAddress}"/>
                    </td>
                    <td>
                        <c:out value="${clickStream.bot}"/>
                    </td>
                    <td>
                        <c:url var="showUrl" value="/domain/clickstream/show.action">
                            <c:param name="clickStream.inode" value="${clickStream.inode}"/>
                        </c:url>
                        <c:url var="confirmDeleteUrl" value="/domain/clickstream/confirmDelete.action">
                            <c:param name="clickStream.inode" value="${clickStream.inode}"/>
                        </c:url>
                        <a class="actionShow" href="${showUrl}"><fmt:message key="label.link.show"/></a>
                        <a class="actionDelete clickStreamAjaxDelete" id="confirmDeleteUrl${status.index}" href="${confirmDeleteUrl}"><fmt:message key="label.link.delete"/></a>
                    </td>
                </tr>

            </c:forEach>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="9">
                        <p>
                            <tags:navigation pager="${pagerDisplay}" url="${searchUrl}" form="${clickStreamSearchForm}"/>
                        </p>
                    </td>
                </tr>
            </tfoot>
        </table>
    </div>
<c:if test="${includeBody}">
</body>
</c:if>